import catma
import enum
import os
import os.path
import re
MODIFIER_BASE = 101
MODIFIER_MULTIPLY = 102
MODIFIER_ADD = 103
MODIFIER_ALL = [MODIFIER_BASE,
 MODIFIER_MULTIPLY,
 MODIFIER_ADD]
MODIFIER_NAME = {MODIFIER_BASE: 'BASE',
 MODIFIER_MULTIPLY: 'MULTIPLY',
 MODIFIER_ADD: 'ADD'}
MODIFIER_OPERATOR = {MODIFIER_MULTIPLY: '*',
 MODIFIER_ADD: '+',
 MODIFIER_BASE: '='}
EDITORFLAG_MULTILINE = 'multiline'
VALUE_ADD = 'Add'
VALUE_EDIT = 'Edit'
VALUE_INIT = 'Init'
VALUE_PARENT_UPDATE = 'Parent Update'
VALUE_REMOVE = 'Remove'
SET_APPEND = 'append'
SET_DELETE = 'delete'
SET_CLEAR = 'clear'
SET_PARENT_APPEND = 'parent_append'
SET_PARENT_DELETE = 'parent_delete'
SET_PARENT_CLEAR = 'parent_clear'
PARENT_SET_OPERATION = {SET_APPEND: SET_PARENT_APPEND,
 SET_DELETE: SET_PARENT_DELETE,
 SET_CLEAR: SET_PARENT_CLEAR}
HIERARCHICAL_VALUE_CONTAINER = True
POPULATE_VALUE_CONTAINER = True
SORT_VALUE_NAMES = True
TYPE_REFERENCE_NONE = 'Null'
TYPE_NAME_NONE = '0'
TYPEID_NONE = -1
EXPORT_ALL = 'All'
EXPORT_PUBLISHED = 'Published'
EXPORT_VERIFIED = 'Verified'
MODIFY_REMOVED = 'removed'
MODIFY_TYPE_CHANGED = 'typechanged'
MODIFY_RENAMED = 'renamed'
MODIFY_FLAG_ALL = (MODIFY_REMOVED,
 MODIFY_TYPE_CHANGED,
 MODIFY_RENAMED)
INCLUDE_ALL = '*'
CONTENT_INDEX = 'contentIndex'
ATTRIB_FLAGS = enum.Enum('IS_SET', 'PUBLISHED', 'MODULIZED', 'NOT_NULL', 'TYPE_REF', 'HIDDEN', 'EXPORTED', 'CONTENT_REF', value_type=lambda self, i, k: (1 << (i + 32)))
INHERITABLE_ATTRIB_FLAGS = (ATTRIB_FLAGS.MODULIZED | ATTRIB_FLAGS.NOT_NULL)
DEFAULT_ATTRIB_FLAGS = (ATTRIB_FLAGS.PUBLISHED | ATTRIB_FLAGS.EXPORTED)
SIMPLE_TYPE_SERIAL_UIDS = enum.Enum('INT', 'STR', 'FLT', 'BOOL', 'ENUM', 'UNICODE', value_type=lambda self, i, k: (50 + i))

